<template>
	<view class="noErrorBody">
		<image src="../../static/logo.png" mode="" class="logo"></image>
		<view class="empty-view-title">配达丰</view>
		<view v-if="version" class="empty-view-version">v{{version}}</view>
		<view class="empty-view-handle flex justify-center align-center" @click="tapClick">立即开启</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				version: '',
			}
		},
		onLoad() {
			// #ifdef APP-PLUS
			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
				this.version = wgtinfo.version;
			});
			// #endif
		},
		methods: {
			tapClick() {
				this.normalOpen();
			},

			// 正常启动
			normalOpen() {
				// console.log('netError:正常启动');
				uni.setStorageSync('hasOpenApp', true);
				uni.reLaunch({
					url: './index'
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.noErrorBody {
		height: 100%;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-content: center;
		align-items: center;
		justify-content: center;

		.logo {
			margin-top: 300rpx;
			width: 144rpx;
			height: 144rpx;
			border-radius: 10rpx;
		}

		.empty-view-title {
			margin-top: 40rpx;
			font-size: 32rpx;
			font-weight: 400;
			color: rgba(84, 86, 106, 1);
			line-height: 36rpx;
		}

		.empty-view-version {
			margin-top: 10rpx;
			font-size: 24rpx;
			font-weight: 400;
			color: rgba(84, 86, 106, 1);
		}

		.empty-view-handle {
			margin-top: 60rpx;
			width: 200rpx;
			height: 72rpx;
			border-radius: 40rpx;
			color: #F97108;
			border: 2rpx solid #F97108;
		}
	}
</style>
